package com.qf.service.impl;

import com.qf.mapper.UserMapper;
import com.qf.pojo.UserPojo;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl  implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public UserPojo selectUserByuname(String uname) {
        return userMapper.selectUserByuname(uname);
    }

    @Override
    public void addUser(UserPojo userPojo) {
        userMapper.addUser(userPojo);
    }

    @Override
    public void deleteUser(int uid) {
        userMapper.deleteUser(uid);
    }

    @Override
    public void updateUser(UserPojo userPojo) {
        userMapper.updateUser(userPojo);
    }

    @Override
    public List<UserPojo> selectAllUser() {
        return userMapper.selectAllUser();
    }

    @Override
    public UserPojo selectById(int uid) {
        return userMapper.selectById(uid);
    }
}
